package de.hauschild.gmltracer.gml.impl.value.geometry.tier1;

import de.hauschild.gmltracer.gml.Environment;
import de.hauschild.gmltracer.gml.TokenStack;
import de.hauschild.gmltracer.gml.impl.AbstractToken;
import de.hauschild.gmltracer.gml.impl.value.point.PointToken;

public class DirectionalLightOperatorToken extends AbstractToken {

  @Override
  public void evaluate(final Environment environment, final TokenStack tokenStack) {
    final PointToken color = tokenStack.pop(PointToken.class);
    final PointToken direction = tokenStack.pop(PointToken.class);

    tokenStack.push(new DirectionalLightToken(direction, color));
  }

  @Override
  public String toString() {
    return "light";
  }
}
